home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 8
/
The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO
/
g_quake
/
server~1.zip
/
_SKIN.QC
< prev
next >
Wrap
Text File
|
1996-10-04
|
6KB
|
139 lines
/*
**
** _skin.qc (Skin Code, 1.2)
**
** Copyright (C) 1996 Johannes Plass
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
** Author: Johannes Plass (plass@dipmza.physik.uni-mainz.de)
**
*/
/*
** Please note that this file is based on Dennis Noordsij's
** (lnoordsi@inter.NL.net) Multiskin QuakeC patch.
** Please visit Dennis Noordsij's QuakeC page at
** http://web.inter.NL.net/users/L.J.Noordsij/qc.htm
** for further information on Multiskin and how to install it on the
** client side (that is, how to use it as a player).
** //#jp#
*/
float max_skin = 18; // = number of skins - 1
void(entity player) SkinInfo =
{
if (!USE_MODULE_SKIN) return;
// 123456789#123456789#123456789#12345678
sprint(player,"£");
sprint(player," Skin");
sprint(player, " allows to use other skins.\n");
sprint(player," Type 'help-skin' for help.\n");
};
void(entity player) SkinInit =
{
if (!USE_MODULE_SKIN) return;
stuffcmd(player,"alias skin-next \"impulse 200\";\n");
stuffcmd(player,"alias skin-prev \"impulse 201\";\n");
stuffcmd(player,"alias help-skin \"impulse 202\";\n");
};
void(entity player) SkinActiveMessage =
{
if (!USE_MODULE_SKIN) return;
// 123456789#123456789#123456789#12345678
sprint(player," Skin (help-skin)\n");
};
void(entity player) SkinHelp =
{
if (!USE_MODULE_SKIN) return;
// 123456789#123456789#123456789#12345678
sprint(player,"Skin:");
sprint(player, " allows the use of other skins.\n");
sprint(player,"To choose a skin use the command\n");
sprint(player,"'skin-next' or 'skin-prev'.\n");
};
void(entity player,float offset) SkinQuietlyUseOtherSkin =
{
if (!USE_MODULE_SKIN) return;
player.skin = player.skin + offset;
if (player.skin < 0 ) player.skin = max_skin;
if (player.skin > max_skin) player.skin = 0;
SkinSaveSkinInStatusFlag(player);
};
void(entity player,float offset) SkinUseOtherSkin =
{
if (!USE_MODULE_SKIN) return;
SkinQuietlyUseOtherSkin(player,offset);
SkinShowCurrentSkin(player);
};
void(entity player) SkinShowCurrentSkin =
{
local string m;
if (!USE_MODULE_SKIN) return;
// 123456789#123456789#123 123456789#123456789#123
if (player.skin == 0) m = "\n\nSkin 1: \n\n\nTop20Skins: Soldier \nMultiSkin: Soldier \n";
else if (player.skin == 1) m = "\n\nSkin 2: \n\n\nTop20Skins: Enforcer \nMultiSkin: Duke \n";
else if (player.skin == 2) m = "\n\nSkin 3: \n\n\nTop20Skins: Toad \nMultiSkin: Toad \n";
else if (player.skin == 3) m = "\n\nSkin 4: \n\n\nTop20Skins: Crusader \nMultiSkin: Stormtrooper\n";
else if (player.skin == 4) m = "\n\nSkin 5: \n\n\nTop20Skins: Hell Knight \nMultiSkin: Maxx \n";
else if (player.skin == 5) m = "\n\nSkin 6: \n\n\nTop20Skins: Terminator \nMultiSkin: Terminator \n";
else if (player.skin == 6) m = "\n\nSkin 7: \n\n\nTop20Skins: Han Solo \nMultiSkin: Judge Dredd \n";
else if (player.skin == 7) m = "\n\nSkin 8: \n\n\nTop20Skins: Hitman \nMultiSkin: Camouflaged \n";
else if (player.skin == 8) m = "\n\nSkin 9: \n\n\nTop20Skins: Biosuit \nMultiSkin: Picard \n";
else if (player.skin == 9) m = "\n\nSkin 10: \n\n\nTop20Skins: Delavar \nMultiSkin: Wizard \n";
else if (player.skin == 10) m = "\n\nSkin 11: \n\n\nTop20Skins: Predator \nMultiSkin: Predator \n";
else if (player.skin == 11) m = "\n\nSkin 12: \n\n\nTop20Skins: C3PO \nMultiSkin: Skeleton \n";
else if (player.skin == 12) m = "\n\nSkin 13: \n\n\nTop20Skins: Knight \nMultiSkin: Wan-Fu \n";
else if (player.skin == 13) m = "\n\nSkin 14: \n\n\nTop20Skins: Rollins \nMultiSkin: Rollins \n";
else if (player.skin == 14) m = "\n\nSkin 15: \n\n\nTop20Skins: Bossk \nMultiSkin: He-Man \n";
else if (player.skin == 15) m = "\n\nSkin 16: \n\n\nTop20Skins: Barbarian \nMultiSkin: Boba \n";
else if (player.skin == 16) m = "\n\nSkin 17: \n\n\nTop20Skins: Ogre \nMultiSkin: Superman \n";
else if (player.skin == 17) m = "\n\nSkin 18: \n\n\nTop20Skins: Zombie \nMultiSkin: NYPD Cop \n";
else if (player.skin == 18) m = "\n\nSkin 19: \n\n\nTop20Skins: Moleman \nMultiSkin: Women dude \n";
else m = "";
centerprint(player,m);
};
void(entity player) SkinRestoreSkinFromStatusFlag =
{
if (!USE_MODULE_SKIN) return;
self.skin = (self.player_status & 63488)/2048;
};
void(entity player) SkinSaveSkinInStatusFlag =
{
if (!USE_MODULE_SKIN) return;
self.player_status = self.player_status - (self.player_status & 63488);
self.skin = (self.skin & 31);
self.player_status = self.player_status + 2048 * self.skin;
};